home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / pdcurs21.zip / NONPORT.ZIP / TABSIZE.C < prev    next >
Text File  |  1992-11-21  |  1KB  |  46 lines

  1. #define        CURSES_LIBRARY  1
  2. #include <curses.h>
  3. #undef tabsize
  4.  
  5. #ifndef        NDEBUG
  6. char *rcsid_tabsize = "$Header: c:/curses/nonport/RCS/tabsize.c%v 2.0 1992/11/15 03:18:29 MH Rel $";
  7. #endif
  8.  
  9.  
  10.  
  11.  
  12. /*man-start*********************************************************************
  13.  
  14.   tabsize()    - Set tab size in window
  15.  
  16.   PDCurses Description:
  17.        This routine sets the tabsize for stdscr and returns the previous
  18.        tab size settings.
  19.  
  20.   PDCurses Return Value:
  21.        This routine returns the previous tab size setting upon success
  22.        otherwise, it returns ERR.
  23.  
  24.   PDCurses Errors:
  25.        It is an error to call this routine before initscr().
  26.  
  27.   Portability:
  28.        PDCurses        int tabsize( int ts );
  29.        X/Open Dec '88  
  30.        SysV Curses     
  31.        BSD Curses      
  32.  
  33. **man-end**********************************************************************/
  34.  
  35. int    tabsize(int ts)
  36. {
  37.        int     origval;
  38.  
  39.        if (stdscr == (WINDOW *)NULL)
  40.                return( ERR );
  41.  
  42.        origval = stdscr->_tabsize;
  43.        stdscr->_tabsize = ts;
  44.        return( origval );
  45. }
  46.